using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using GraphAlgsPresentation.Core;
using System.Xml.Serialization;
using System.ComponentModel;

namespace GraphAlgsPresentation.ScriptLibrary
{
    /// <summary>
    /// Provides the abstract class Command
    /// </summary>
    [Serializable]
    public abstract class Command
    {
        protected Context _context;

        /// <summary>
        /// returns GraphAlgsPresentation.Core.Context object
        /// </summary>
        [XmlIgnore]
        [Browsable(false)]
        public Context Context
        {             
            get { return _context; }
            set { _context = value; }
        }

        private DrawEffect _effect = DrawEffect.NoEffect;

        /// <summary>
        /// Gets or sets the effect.
        /// </summary>
        /// <value>The effect.</value>
        public DrawEffect Effect
        {
            get { return _effect; }
            set { _effect = value; }
        }

        /// <summary>
        /// Runs this instance.
        /// </summary>
        public abstract void Run();
        /// <summary>
        /// Undoes this instance.
        /// </summary>
        public abstract void Undo();
    }
}
